package com.software.virtual;
//以下是导入management实体类的包
import com.software.management.Class;
import com.software.management.Group;
import com.software.management.Student;
import com.software.management.User;

public class Run {
    public static void main(String[] args) {
        //在这里添加学生信息
        Student stu1=new Student("李梓欢","1");
        Student stu2=new Student("廖雨涵","2");
        Student stu3=new Student("小a","3");
        Student stu4=new Student("小b","4");
        Student stu5=new Student("小c","5");
        Student stu6=new Student("小d","6");
        //在这里添加小组
        Group gro1=new Group("A组",1);
        Group gro2=new Group("B组",2);
        Group gro3=new Group("C组",3);

        //将学生信息分组
        gro1.setStudent(stu1);
        gro1.setStudent(stu2);
        gro2.setStudent(stu3);
        gro2.setStudent(stu4);
        gro3.setStudent(stu5);
        gro3.setStudent(stu6);

        //创建Class类对象cla
        Class cla=new Class();
        //添加学生到cla中
        cla.setStudent(stu1);
        cla.setStudent(stu2);
        cla.setStudent(stu3);
        cla.setStudent(stu4);
        cla.setStudent(stu5);
        cla.setStudent(stu6);

        //添加小组到cla中
        cla.setGroupList(gro1);
        cla.setGroupList(gro2);
        cla.setGroupList(gro3);

        //创建user
        User user=new User("lizihuan","123456");
        //随机抽人
        user.callRoll(cla);//在班级中随机抽取一名学生
        user.callGroup(cla);//在班级中随机抽取一个小组
        user.callMember(gro2);//在已定的小组中随机抽取一名学生


























//        System.out.println();
//        user.callMember(user.callGroup(cla));//随机一个小组抽这个小组的随机一个学生
        
        //用toString的重写方法来打印各个类的全部信息
        //System.out.println(cla.toString());
        //System.out.println(stu1.toString());
        //System.out.println(user.toString());
        //System.out.println(gro1.toString());


    }
}


















//int choice=user.makeChoice();
//        user.doChoice(choice,gro1);
//        System.out.print("学生当前成绩为：");
//        System.out.println(gro1.getPoint());